package com.ai;

import net.sourceforge.tess4j.ITesseract;
import net.sourceforge.tess4j.Tesseract;
import net.sourceforge.tess4j.TesseractException;

import java.io.File;

public class ExtractionText {

   /* public static void main(String[] args) {

        ITesseract iTesseract = new Tesseract();

        //设置语言包的路径   默认是项目根目录所以可以不设置
  //  iTesseract.setDatapath("C:\\Program Files (x86)\\Tesseract-OCR\\tessdata\\");
        //设置语言包的类型
       iTesseract.setLanguage("chi_sim");

        File pfile = new File("C:\\tess4j\\e.png");

        try {
            String data = iTesseract.doOCR(pfile);
            System.out.println(data);
        } catch (TesseractException e) {
            e.printStackTrace();
        }
    }*/
}
